<template>
    <div class="app-container">
        <el-table
        v-loading=false
        :data="list"
        element-loading-text="Loading"
        border
        fit
        highlight-current-row>
            <el-table-column align="center" label="序号">
                <template slot-scope="scope">{{ scope.$index+1 }}</template>
            </el-table-column>
            <el-table-column align="center" label="名称">
                <template slot-scope="scope">{{ scope.row.Name }}</template>
            </el-table-column>
            <el-table-column align="center" label="命名空间">
                <template slot-scope="scope">{{ scope.row.NameSpace }}</template>
            </el-table-column>
            <el-table-column align="center" label="创建时间">
                <template slot-scope="scope">{{ scope.row.CreateTime }}</template>
            </el-table-column>
        </el-table>
    </div>
</template>
<script>
import { getList } from '@/api/services'
export default {
    data() {
        return {
            list: null
        }
    },
    created() {
        this.fetchData()
    },
    methods: {
        fetchData() {
            getList("k8scode").then(response => {
                this.list = response.data
            })
        }
    }
}
</script>